<template>
  <el-row>
    <el-row>
      <el-col :span="24">
        <el-form-item :label="$t('公司网址')" prop="companyUrl">
          <el-input v-model="equityForm.companyUrl" :placeholder="$t('公司网址')" show-word-limit :maxlength="200" />
        </el-form-item>
      </el-col>
    </el-row>
    <el-col :span="12">
      <el-form-item :label="$t('聚焦行业')" prop="industryFocus">
        <FocusIndustry :industry-data="equityForm.industryFocusList" @industryFocusList="getIndustryFocusList" />
        <!--        <dictSelect
                  v-model="equityForm.industryFocus"
                  :clearable="true"
                  dictionary="deal_industry_focus"
        />-->
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item :label="$t('投资轮次')" prop="round">
        <el-select v-model="equityForm.round" multiple :placeholder="$t('投资轮次')">
          <el-option
            v-for="dict in roundsInvestmentOptions"
            :key="dict.dictValue"
            :label="$t(dict.dictLabel)"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item :label="$t('投资类型')" prop="investmentType">
        <dictSelect
          v-model="equityForm.investmentType"
          :clearable="true"
          dictionary="equity_investment_type"
        />
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item :label="$t('公司总股数/注册资本(万)')" prop="totalShare">
        <Money v-model="equityForm.totalShare" unit="w" :placeholder="$t('公司总股数/注册资本')" />
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item :label="$t('投前估值') + $t('金额单位')" prop="valuationBeforeInvestment">
        <Money v-model="equityForm.valuationBeforeInvestment" unit="w" :placeholder="$t('投前估值')" />
      </el-form-item>
    </el-col>
    <el-col :span="12">
      <el-form-item :label="$t('预计退出时间')" prop="estimatedExitTime">
        <DatePicker v-model="equityForm.estimatedExitTime" :placeholder="$t('预计退出时间')" />
      </el-form-item>
    </el-col>
    <el-col :span="24">
      <el-form-item :label="$t('退出计划')" prop="planExit">
        <el-input v-model="equityForm.planExit" type="textarea" :placeholder="$t('退出计划')" show-word-limit maxlength="2000" />
      </el-form-item>
    </el-col>
    <el-col :span="24">
      <el-form-item :label="$t('收入情况')" prop="income">
        <el-input v-model="equityForm.income" :placeholder="$t('收入情况')" type="textarea" :maxlength="2000" show-word-limit />
      </el-form-item>
    </el-col>
    <el-col :span="24">
      <el-form-item :label="$t('利润情况')" prop="profitIs">
        <el-input v-model="equityForm.profitIs" :placeholder="$t('利润情况')" type="textarea" :maxlength="2000" show-word-limit />
      </el-form-item>
    </el-col>
    <el-col :span="24">
      <el-form-item :label="$t('专利信息')" prop="patentInformation">
        <el-input v-model="equityForm.patentInformation" :placeholder="$t('专利信息')" type="textarea" :maxlength="2000" show-word-limit />
      </el-form-item>
    </el-col>
  </el-row>
</template>

<script>
  export default {
    name: 'DealWfStorageEquityForm',
    props: {
      // form
      equityForm: {
        type: Object,
        required: true
      }
    },
    data() {
      return {
        // 投资轮次
        roundsInvestmentOptions: []
      }
    },
    created() {
      // 投资轮次
      this.getDicts('rounds_investment').then(response => {
        this.roundsInvestmentOptions = response.data
      })
    },
    methods: {
      // 获取聚焦行业数据
      getIndustryFocusList(val) {
        this.equityForm.industryFocus = val[0]
        if (val[1]) {
          this.equityForm.industryFocusTwo = val[1]
        } else {
          this.equityForm.industryFocusTwo = ''
        }
      }
    }
  }
</script>
